package com.kly.enums;

public enum SubscriptionProcessStatus {

    INIT(1, "初始化"),

    PAID(1, "成功"),

    PAID_FAILED(2, "失败"),




    ;
    private int status;
    private String description;

    SubscriptionProcessStatus(int status, String description) {
        this.status = status;
        this.description = description;
    }

    public static SubscriptionProcessStatus fromType(int status) {

        for (SubscriptionProcessStatus orderStatus : values()) {
            if (orderStatus.getStatus() == status) {
                return orderStatus;
            }
        }
        return null;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
